From: Florian Müllner Date: Fri, 26 Apr 2019 08:23:28 +0000 (+0200) Subject: keyboard: Disable emoji support on X11 X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~845^2^2~241 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a63ba61194dc7bba11e20809156183380312fdc0;p=gnome-shell.git keyboard: Disable emoji support on X11 Unlike regular keys that generate key events from a virtual device, emoji keys rely on the input method to insert the character. However as the compositor cannot inject IM events into ibus, this only works in the shell's own entries on X11. We shouldn't expose mostly broken functionality to the user, so limit the feature to the wayland session. https://gitlab.gnome.org/GNOME/gnome-shell/issues/1172 --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index c19930f8d..71ebd5596 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1049,7 +1049,7 @@ var Keyboard = class Keyboard { this._a11yApplicationsSettings.connect('changed', this._syncEnabled.bind(this)); this._lastDeviceId = null; this._suggestions = null; - this._emojiKeyVisible = true; + this._emojiKeyVisible = Meta.is_wayland_compositor(); this._focusTracker = new FocusTracker(); this._focusTracker.connect('position-changed', this._onFocusPositionChanged.bind(this)); @@ -1202,10 +1202,12 @@ var Keyboard = class Keyboard { this._keyboardNotifyId = this._keyboardController.connect('active-group', this._onGroupChanged.bind(this)); this._keyboardGroupsChangedId = this._keyboardController.connect('groups-changed', this._onKeyboardGroupsChanged.bind(this)); this._keyboardStateId = this._keyboardController.connect('panel-state', this._onKeyboardStateChanged.bind(this)); - this._emojiKeyVisibleId = this._keyboardController.connect('emoji-visible', this._onEmojiKeyVisible.bind(this)); this._keypadVisibleId = this._keyboardController.connect('keypad-visible', this._onKeypadVisible.bind(this)); this._focusNotifyId = global.stage.connect('notify::key-focus', this._onKeyFocusChanged.bind(this)); + if (Meta.is_wayland_compositor()) + this._emojiKeyVisibleId = this._keyboardController.connect('emoji-visible', this._onEmojiKeyVisible.bind(this)); + this._relayout(); }